package org.example.juc.singleton;

public class SingletonTest {
    private static class LazyHolder {
        // final 保障初始化时的线程安全
        public final static SingletonTest INSTANCE = new SingletonTest();
    }

    private SingletonTest() {

    }

    public final static SingletonTest getInstance() {
        return LazyHolder.INSTANCE;
    }

    public static void main(String[] args) throws Exception{

    }
}
